#ifndef _NE_UI_WINDOW_H_
#define _NE_UI_WINDOW_H_

#include <UI/UIObject.h>

namespace ne
{
    class NEAPI UIWindow : public UIObject
    {
        public:
            explicit UIWindow(const std::string &name="UIWindow");

            void setFont(const FontPtr &pFont);
            FontPtr getFont() const;

            void setAtlas(const AtlasPtr &pAtlas);
            AtlasPtr getAtlas() const;

            DynamicGeometryPtr getFontGeometry() const;

            DynamicGeometryPtr getAtlasGeometry() const;

            // FIXME: need remove later
            void updateGeometry()
            {
                _renderAll();
            }

            // FIXME: need remove later
            UIObject* trace(const Ray &ray)
            {
                return _detected(ray);
            }

            virtual ~UIWindow();

        protected:
            virtual bool _renderSelf();

            virtual bool _renderAll();

        protected:
            FontPtr mpFont;
            AtlasPtr mpAtlas;
            DynamicGeometryPtr mpFontGeometry;
            DynamicGeometryPtr mpAtlasGeometry;
    };
}

#endif
